// waituntil {!isnull player};
execVM "player\player_func.sqf";

// execVM "player\camera_scripts.sqf";
// execVM "player\player_intro.sqf";


//////////////// PUBLIC VARIABLE EH //////////////////////

"p_var_setface" addPublicVariableEventHandler {[_this] spawn "\lg_main\face\set_face.sqf"};



_marker = createMarkerLocal["marker_map_intel",[0,0]];
_marker setMarkerShapeLocal "ICON";
_marker setMarkerTypeLocal "Destroy";
_marker setMarkerColor "ColorBlack";
_marker setMarkerAlphaLocal 0;

waituntil {!isnull (findDisplay 46)};
_keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", "_bool = _this call pfunc_d46_kp"]; 

execVM "player\static_object.sqf";


respawn_pos = 0;
_side = side group player;
if (_side == att_side) then {
	respawn_pos = att_respawn_pos;
	p_side = att_side;
	lg_tag = att_faction;
	g_reserve = att_reserve;
	
};

if (_side == def_side) then {
	respawn_pos = att_respawn_pos;
	p_side = def_side;
	lg_tag = def_faction;
	g_reserve = def_reserve;
};

grunt = format["Grunt_%1", lg_tag];
mg = format["Mg_%1", lg_tag]; 
co = format["Co_%1", lg_tag];
ar = format["Ar_%1", lg_tag];
// Deploiment

[grunt, "grunt"] call pfunc_new_model;





// execVM "player\unit_init.sqf";
// player addAction ["test", "test.sqf"];